package start.demo01.datatype;

import com.alibaba.fastjson.JSONObject;
import org.junit.Test;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class MapTest {
    @Test
    public void t0(){
        Map<String,Object> map=new HashMap<>();
//        map.put("k1","kk");
//        map.put("k2",System.currentTimeMillis());
        Iterator<Map.Entry<String, Object>> iterator = map.entrySet().iterator();
        while(iterator.hasNext()){
            Map.Entry<String, Object> entry = iterator.next();
            System.out.println(entry.getKey()+":"+entry.getValue());
        }
    }
    @Test
    public void t1(){
        JSONObject oo=new JSONObject();
        oo.put("21",21);
        oo.put("22",22);
        System.out.println(oo.get("21")==null);
        System.out.println(oo.get("2")==null);
    }
}
